
package inf3791.calendarsystem.others.components.calendar;

import inf3791.calendarsystem.shared.DaySpec;
import java.util.Date;

/**
 * Thrown, when a day is clicked in the calendar
 *
 * @author Jonas Weber
 */
public class DayClickedEvent extends java.util.EventObject {

    public interface DayClickedListener extends java.util.EventListener {
        void calendarDayClicked(DayClickedEvent evt);
    }

    public int getDay() {
        return day;
    }

    public int getMonth() {
        return month;
    }

    public int getYear() {
        return year;
    }

    public Date getDate() {
        return d;
    }
    
    public DaySpec getDaySpec() {
        return ds;
    }
    
    final DaySpec ds;
    final int day;
    final int month;
    final int year;
    final Date d;

    public DayClickedEvent(CalendarWidget source, DaySpec ds, Date d) {
        super(source);
        this.day = ds.day;
        this.month = ds.month;
        this.year = ds.year;
        this.d = d;
        this.ds = ds;
    }
}
